import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "accounts")
public class Account {

	@DatabaseField(canBeNull = false, foreign = true, foreignAutoRefresh=true)
	private ObjetoTeste obj;

	@DatabaseField(generatedId = true)
	private int id;

	@DatabaseField(columnName = "Name")
	private String name;

	@DatabaseField(canBeNull = false)
	private String password;

	Account() {
		// all persisted classes must define a no-arg constructor with at least
		// package visibility
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public ObjetoTeste getObj() {
		return obj;
	}

	public void setObj(ObjetoTeste obj) {
		this.obj = obj;
	}

	@Override
	public String toString() {
//		 TODO Auto-generated method stub
		return "ID:\t\t" + this.id + "\nNombre:\t\t" + this.name
				+ "\nPASS:\t\t" + this.password + "\nObj:\t\t"
				+ this.obj.getId() + "\nObjN:\t\t:" + this.obj.getName();
		
//		return  "\nObj:\t\t"+ this.obj.getId() + "\nObjN:\t\t:" + this.obj.getName();
	}

}
